import request from '../utils/request';

// 查询服务器列表
export function listServer(query) {
  return request({
    url: '/server/server/list',
    method: 'get',
    params: query
  });
}

// 查询服务器详细
export function getServer(id) {
  return request({
    url: '/server/server/' + id,
    method: 'get'
  });
}

// 新增服务器
export function addServer(data) {
  return request({
    url: '/server/server',
    method: 'post',
    data: data
  });
}

// 修改服务器
export function updateServer(data) {
  return request({
    url: '/server/server',
    method: 'put',
    data: data
  });
}

// 删除服务器
export function delServer(ids) {
  return request({
    url: '/server/server/' + ids,
    method: 'delete'
  });
}

// 导出服务器
export function exportServer(query) {
  return request({
    url: '/server/server/export',
    method: 'get',
    params: query
  });
}
